package org.openea.eap.module.obpm.model.form.xml;

import cn.hutool.core.bean.BeanUtil;
import lombok.Data;
import org.openbpm.bus.model.xml.BusinessObjectXml;
import org.openea.eap.module.obpm.model.form.FormDef;

import javax.xml.bind.annotation.*;


@XmlRootElement(name = "formXml")
@XmlAccessorType(XmlAccessType.FIELD)
@Data
public class FormXml {

    public FormXml(){

    }

    public FormXml(FormDef formDef) {
        BeanUtil.copyProperties(formDef, this);
    }

    // 属性
    @XmlAttribute
    private String type;  //pc_vue
    @XmlAttribute
    private String key;
    @XmlAttribute
    private String name;
    @XmlAttribute
    private String desc;
    @XmlAttribute
    private String groupId;  //所属分类
    @XmlAttribute
    private String groupName;
    @XmlAttribute
    private String boKey;
    @XmlAttribute
    private String boName;

    // 子元素
    @XmlElement(name = "html")
    private String html;

    @XmlElement(name = "businessObject")
    private BusinessObjectXml businessObject;
    ;
}
